﻿using MassTransitTest.SqlSugarCore;

namespace MassTransitTest
{
    public class SystemRepository : IConnectStringConfig
    {
        public string GetConnectionString(string connectionStringType, DbSourceTypeEnum dbSourceType = DbSourceTypeEnum.None)
        {
            return "Data Source=192.168.0.103;Initial Catalog=test;User Id=devadmin;Password=devadmin@dev;SslMode = none;AllowLoadLocalInfile=true;";
        }

        public DbConfig GetDbConfigs(string connectionStringType)
        {
            return new DbConfig
            {
                ConnectString = "Data Source=192.168.0.103;Initial Catalog=test;User Id=devadmin;Password=devadmin@dev;SslMode = none;AllowLoadLocalInfile=true;",
                SlaveConfigs = new List<SlaveConfig> { new SlaveConfig { ConnectString = "Data Source=127.0.0.1;Initial Catalog=test;User Id=root;Password=123456;SslMode = none;AllowLoadLocalInfile=true;", HitRate = 10 } }
            };
        }
    }
}
